/**
 * 
 */
package com.hand.cloud.b2b.daos.impl;

import de.hybris.platform.core.model.order.OrderModel;
import de.hybris.platform.servicelayer.ServicelayerTransactionalTest;

import java.util.Date;

import javax.annotation.Resource;

import org.junit.Test;
import org.springframework.util.Assert;

import com.hand.cloud.b2b.daos.OrderDAO;
import com.hand.cloud.b2b.model.EPOrderModel;


/**
 * @author StephenWang
 * @time Jul 28, 2014 3:28:52 PM
 * 
 */
public class DefaultOrderDAOTest extends ServicelayerTransactionalTest
{

	@Resource
	private OrderDAO orderDAO;


	private OrderModel orderModel;

	@Test
	public void test()
	{
		EPOrderModel order = new EPOrderModel();
		/*order.setInvoice_name("孤独的飞鸟");
		order.setBuyer_alipay_no("stephenwang");
		order.setCreationtime(new Date());
		order.setDiscount_fee(null);
		order.setHas_post_fee(Boolean.FALSE);
		order.setInvoice_type("个人发票");
		order.setPayment(new Double(1000));
		order.setPoint_fee(null);
		order.setPost_fee(new Double(20));
		order.setTotal_fee(new Double(1020));*/
		
		order.setInvoiceName("孤独的飞鸟");
		order.setBuyerAlipayNo("stephenWang");
		order.setCreationtime(new Date());
		order.setDiscountFee(null);
		order.setHasPostFee(Boolean.FALSE);
		order.setInvoiceType("个人发票");
		order.setPayment(new Double(1000));
		order.setPointFee(null);
		order.setPostFee(new Double(20));
		order.setTotalFee(new Double(1020));
		
		orderModel = orderDAO.createOrderHds(order);
		//		orderModel = orderDAO.createOrder();
		System.out.println("orderpk:" + orderModel.getPk());
		
		Assert.notNull(orderModel);
	}

}
